<?php
	class loaichuyenmucbs
	{
		// Các trường
		public $MaLoaiChuyenMuc = 0;
		public $TenLoaiChuyenMuc = "";
		public $MaChuyenMuc = 0;
		
		// Các phương thức
		public function Them()
		{
			$db = new loaichuyenmucdb();
			return $db->Them($this->TenLoaiChuyenMuc,
						     $this->MaChuyenMuc);
		}
		
		public function CapNhat()
		{
			$db = new loaichuyenmucdb();
			return $db->CapNhat($this->MaLoaiChuyenMuc, 
								$this->TenLoaiChuyenMuc,
								$this->MaChuyenMuc);
		}
		
		public function TonTaiTrongBaiViet()
		{
			$db = new loaichuyenmucdb();
			return $db->TonTaiTrongBaiViet($this->MaLoaiChuyenMuc);
		}
		
		public function Xoa()
		{
			$db = new loaichuyenmucdb();
			return $db->Xoa($this->MaLoaiChuyenMuc);
		}
		
		public function XoaTatCa()
		{
			$db = new loaichuyenmucdb();
			return $db->XoaTatCa();
		}
		
		public function LayDanhSach()
		{
			$db = new loaichuyenmucdb();
			return $db->LayDanhSach($this->MaLoaiChuyenMuc,
									$this->TenLoaiChuyenMuc,
									$this->MaChuyenMuc);
		}
	}
?>